import request from '@/config/axios'

export interface MemberReportVO {
  id: number
  userId: number
  storeId?: number
  name: string
  report: string
  type: number
  createTime: Date
  summary?: string
  source?: number
  isFree?: boolean
}

export interface MemberReportPageReqVO {
  pageNo: number
  pageSize: number
  userId?: number
  type?: number
}

// 查询会员报告分页
export const getMemberReportPage = async (params: MemberReportPageReqVO) => {
  return await request.get({
    url: '/member/report/page',
    params
  })
}

// 查询会员报告详情
export const getMemberReport = async (id: number) => {
  return await request.get({
    url: `/member/report/get?id=${id}`
  })
}

// 删除会员报告
export const deleteMemberReport = async (id: number) => {
  return await request.delete({
    url: `/member/report/delete?id=${id}`
  })
} 
